<template>
    <div>
        <el-table
    :data="tableData"
    style="width: 100% ;margin-left:30px">
    <el-table-column type="expand">
      <template slot-scope="props">
        <el-form label-position="left" inline class="demo-table-expand">
          <el-form-item label="姓名">
            <span>{{ props.row.name }}</span>
          </el-form-item>
          <el-form-item label="邮箱">
            <span>{{ props.row.email }}</span>
          </el-form-item>
          <el-form-item label="内容">
            <span>{{ props.row.content }}</span>
          </el-form-item>
        </el-form>
      </template>
    </el-table-column>
    <el-table-column
      label="姓名"
      prop="name">
    </el-table-column>
    <el-table-column
      label="邮箱"
      prop="email">
    </el-table-column>
    <el-table-column
      label="内容"
      prop="content"
      style="overflow:hidden;text - overflow:ellipsis"
      >
    </el-table-column>
  </el-table> 
    </div>
</template>
<script>
export default {
    data(){
        return{
         tableData:[]
        }
    },
    created(){
         this.$http.post("/api/blog/getcontactlist").then(res => {
	  
	  this.tableData = res.data.data;
    });
    }
}
</script>
<style lang="css">
    .demo-table-expand {
    font-size: 0;
  }
  .demo-table-expand label {
    width: 90px;
    color: #99a9bf;
  }
  .demo-table-expand .el-form-item {
    margin-right: 0;
    margin-bottom: 0;
    width: 50%;
  }
</style>